package com.net.test.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.net.test.db.MybatisDAO;


@Service
public class ExboardService {
	
	@Autowired
	
	MybatisDAO mybatisDAO;
	
	
	public Object selectData(String id) throws Exception{
		
		Object lists = "";
		lists = mybatisDAO.getListData(id);
		
		return lists;
	}
	public int insertData(String id, Object obj) throws Exception{
		
		int result = 0;
		result = mybatisDAO.insertData(id, obj);
		
		return result;
	}
	 public Object getViewData(String id, String value) throws Exception{
		 
		 Object lists = "";
		 lists = mybatisDAO.getViewDataOne(id, value);
		 
		 return lists;
	 }
	 public int updateData(String id, Object obj) throws Exception{
		 
		 int result = 0;
		 
		 result = mybatisDAO.updateData(id, obj);
		 
		 return result;
	 }
	 public int deleteData(String id, Object obj) throws Exception{
		 
		 int result = 0;
		 
		 result = mybatisDAO.deleteData(id, obj);
		 
		 return result;
	 }
	

}
